import request from '@/utils/request'

// 分配需求单
export default {

  listAll(currentPage,pageSize){
    return request({
      url: `/need/need/findAll/${currentPage}/${pageSize}`,
      method: 'get'
    })
  },
  
  saveNeed() {
    return request({
      url: `/need/needallocation/save`,
      method: 'post'
    })
  },

  // 查询出列表
  list(params) {
    return request({
      url: `/need/needallocation/list`,
      method: 'post',
      data:params
    })
  },
  // 根据ID查询信息
  info(id) {
    return request({
      url: `/need/needallocation/info/${id}`,
      method: 'get'
    })
  },
  // 修改需求单
  update(data) {
    return request({
      url: `/need/needallocation/update`,
      method: 'post',
      data: data
    })
  },

  // 删除1个或删除多个
  deleteAll(data) {
    return request({
      url: `/need/needallocation/delete`,
      method: 'delete',
      data: data
    })
  }
}
